package com.junhai.tamsys.util;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

public class CollectionUtils {
	
	public static List<Long> LMapToLList(Map map){
		Collection values = map.values();
		List<Long> list = new ArrayList<Long>();
		
		Iterator it = values.iterator();
		while(it.hasNext()){
			list.add( ((Long)it.next()) );
		}
		
		return list;
	}
	
	public static Collection removeNull(Collection c){
		Iterator it = c.iterator();
		while(it.hasNext()){
			if(it.next() == null){
				it.remove();
			}
		}
		
		return c;
	}

}
